package com.example.work_study_system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.example.work_study_system.mapper.UserMapper;
import com.example.work_study_system.model.domain.User;
import com.example.work_study_system.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Override
    public User login(String username, String password) {
        QueryWrapper<User> query = new QueryWrapper<>();
        query.eq("username", username).eq("password", password).eq("is_deleted", 0);
        return this.getOne(query);
    }
} 